home *** CD-ROM | disk | FTP | other *** search
/ Clinical Endocrinology / Clinical Endocrinology.iso / pc / 00000000 / notes.dir / 00002_Script_2 < prev    next >
Text File  |  1995-11-09  |  2KB  |  69 lines

  1. on startMovie
  2.   
  3.   global grabbedText
  4.   setTextFormat
  5.   
  6. end startMovie
  7. ----------------------------------------------------
  8. on pasteTextFromClip
  9.   
  10.   pasteClipboardInto cast "Clipboard Field"
  11.   put the text of cast "Clipboard Field" into theText
  12.   put the selEnd into insertPoint
  13.   put theText after char insertPoint of field "Notes Field" 
  14.   
  15. end pasteTextFromClip
  16. ----------------------------------------------------
  17. on readTextFile
  18.   
  19.   global gReadObj
  20.   if objectp(gReadObj) then gReadObj(mdispose)
  21.   set gReadObj = fileio(mnew,"?read", "TEXT")
  22.   
  23.   if not objectp(gReadObj) then
  24.     --alert fileio(merror,gReadObj)
  25.   else
  26.     put gReadObj(mReadFile) into field "Notes Field"
  27.   end if
  28.   
  29.   
  30.   
  31. end readTextFile
  32. ----------------------------------------------------
  33. on writeTextFile
  34.   
  35.   global gWriteObject
  36.   
  37.   if the machineType <> 256 then
  38.     put "Text File" into defaultName
  39.   else
  40.     put "*.TXT" into defaultName
  41.   end if
  42.   
  43.   set gWriteObject = fileio(mNew,"?write", defaultName)
  44.   if objectP(gWriteObject) then
  45.     
  46.     put the text of field "Notes Field" into theText
  47.     gWriteObject(mWriteString,theText)
  48.     
  49.     gWriteObject(mdispose)
  50.   end if
  51.   
  52.   
  53. end writeTextFile
  54. ------------------------------------------------------
  55. on setTextFormat
  56.   
  57.   if the machineType <> 265 then
  58.     set helveticaText = "Helvetica"
  59.   else
  60.     set helveticaText = "Arial"
  61.   end if
  62.   
  63.   if voidP(HelveticaText) = false then
  64.     set the textFont of field "Notes Field" = HelveticaText
  65.   end if
  66.   
  67.   set the textSize of field "Notes Field" = 12
  68.   
  69. end setTextFormat